package com.oauth2_security.model;

import com.oauth2_security.enums.SystemRest;

public class RestFulVO <T> {
    /**
     * 返回编号
     */
    private String restCode;

    /**
     * 返回消息
     */
    private String restMsg;

    /**
     * 数据返回
     */
    private T data;

    public RestFulVO(){
        super();
    }

    public RestFulVO(String restCode, String restMsg) {
        this.restCode = restCode;
        this.restMsg = restMsg;
    }

    public RestFulVO(String restCode, String restMsg, T data) {
        this.restCode = restCode;
        this.restMsg = restMsg;
        this.data = data;
    }

    public RestFulVO(SystemRest systemRest, T data) {
        this.restCode = systemRest.getCode();
        this.restMsg = systemRest.getMsg();
        this.data = data;
    }

    public RestFulVO(SystemRest systemRest) {
        this.restCode = systemRest.getCode();
        this.restMsg = systemRest.getMsg();
    }

    public String getRestCode() {
        return restCode;
    }

    public void setRestCode(String restCode) {
        this.restCode = restCode;
    }

    public String getRestMsg() {
        return restMsg;
    }

    public void setRestMsg(String restMsg) {
        this.restMsg = restMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
